<!--
 * @Description: 
 * @Version: 1.0
 * @Autor: laikt
 * @Date: 2020-12-30 10:43:50
 * @LastEditors: laikt
 * @LastEditTime: 2021-01-07 13:57:08
-->
<template>
    <el-pagination
        :current-page="current"
        :page-size="size"
        :total="total"
        :pager-count="5"
        :page-sizes="[100, 200, 300, 400]"
        layout="total, sizes, prev, pager, next, jumper"
        background
        @size-change="onSizeChange"
        @current-change="onCurrentChange"
    >
    </el-pagination>
</template>

<script>
export default {
    name: 'pagination',
    props: {
        current: {
            type: Number,
            default: 1
        },
        size: {
            type: Number,
            default: 10
        },
        total: {
            type: Number,
            default: 0
        }
    },
    methods: {
        onSizeChange() {
            this.$emit('change')
        },
        onCurrentChange() {
            this.$emit('change')
        }
    }
}
</script>
